package com.Thread.Demo7;

/**
 * @ClassName Customer
 * @Description TODO
 * @Author Kx
 * @Date 2025/3/12 11:34
 * @Version 1.0
 */
public class Customer extends Thread{
    private Account account; // 账户

    private double money; // 取钱数

    public Customer(){

    }
    public Customer(Account account, double money){
        this.account = account;
        this.money = money;
    }
    public Customer(Account account, double money,String name){
        super(name);
        this.account = account;
        this.money = money;
    }

    @Override
    public void run() {
        account.withdraw(money);
    }
}
